package com.swagger.demo.admin;

import com.jfinal.core.Controller;
import com.jfinal.core.Path;
import com.lastb7.swagger.enumeration.ApiEnum;
import com.swagger.demo.admin.bean.BaseTypeBean;
import com.swagger.demo.admin.bean.ListBean;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * @author: lbq
 * 联系方式: 526509994@qq.com
 * 创建日期: 2020/9/16
 */
@Path("/baseType")
@Api(description = "baseType", tags = "基本数据类型")
public class BaseTypeController extends Controller {
    @ApiOperation(value = "基本数据类型", httpMethod = ApiEnum.METHOD_POST)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "基本数据类型", dataTypeClass = BaseTypeBean.class, paramType = ApiEnum.PARAM_TYPE_BODY, required = true),
    })
    public void bean1() {

        this.renderJson();
    }

    @ApiOperation(value = "数组", httpMethod = ApiEnum.METHOD_POST)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "arr", value = "数组", dataTypeClass = ListBean.class, paramType = ApiEnum.PARAM_TYPE_BODY, required = true),
    })
    public void bean2() {

        this.renderJson();
    }
}
